import {h} from "vue";
import AppFactory from "@/utils/AppFactory";

export function showComponentToBody(component: any) {
  let div: HTMLDivElement = document.createElement('div');
  document.body.appendChild(div);
  let res = h(component, {
    onClose: () => {
      div.remove();
    }
  })
  return AppFactory(res).mount(div)
}